package fun.easycode.webterminal.common.datafill;

import java.util.List;

public class FillTask implements Runnable {

    private final FillFieldStrategy strategy;
    private final Class<?> source;
    private final String sourceKey;
    private final List<Metadata> metadataList;

    public FillTask(FillFieldStrategy strategy, Class<?> source, String sourceKey, List<Metadata> metadataList) {
        this.strategy = strategy;
        this.source = source;
        this.sourceKey = sourceKey;
        this.metadataList = metadataList;
    }


    @Override
    public void run() {
        strategy.fill(source, sourceKey, metadataList);
    }
}
